package dome3;

/**
 * Created with IntelliJ IDEA.
 * Description: Clone接口代码测试
 * User: 王圆豪
 * Date: 2024-06-28
 * Time: 14:16
 */
public class Test {
    public static void main(String[] args) throws CloneNotSupportedException{
        Deposit deposit = new Deposit(5000);
        Person person1 = new Person("wyh", 13, deposit);
        Person person2 = (Person) person1.clone();
        person1.setName("tjy");
        System.out.println(person1);
        System.out.println(person2);
    }
}
